#ifndef __DB_H__
#define __DB_H__

#include <mysql/mysql.h>
#include <string>


class MySQL
{
public:
    MySQL();
    ~MySQL();
    bool connect(const std::string &server, const std::string &user, 
        const std::string &pwd, const std::string &db);
    bool update(const std::string &sql);
    MYSQL_RES *query(const std::string &sql);
    MYSQL *getConnection();
private:
    MYSQL *conn_;
};

#endif